export interface ResourceInfo {
  originalUrl: string;
  localPath: string;
  type: ResourceType;
  size?: number;
  hash?: string;
  source: 'cdn' | 'external';
  pathInProject?: string; // 在项目中的路径结构
}

export interface ResourceManifest {
  total: number;
  downloaded: number;
  external: number;
  cdn: number;
  files: ResourceInfo[];
  originalCdnDomain: string;
  newCdnDomain: string;
}

export enum ResourceType {
  IMAGE = 'image',
  SCRIPT = 'script',
  STYLE = 'style',
  FONT = 'font',
  VIDEO = 'video',
  AUDIO = 'audio',
  OTHER = 'other'
}

export interface ProjectExportWithResources {
  project: any;
  documents: any[];
  types: any[];
  exportTime: number;
  version: string;
  resources: ResourceManifest;
}